Add patch for i386 test failure
authorJochen Sprickerhof <git@jochen.sprickerhof.de>
Fri, 7 Aug 2020 13:37:44 +0000 (15:37 +0200)
committerJochen Sprickerhof <git@jochen.sprickerhof.de>
Fri, 7 Aug 2020 13:37:55 +0000 (15:37 +0200)
debian/patches/620.patch [new file with mode: 0644]
debian/patches/series
debian/rules

diff --git a/debian/patches/620.patch b/debian/patches/620.patch
new file mode 100644 (file)
index 0000000..6af208c
--- /dev/null
@@ -0,0 +1,43 @@
+From fc5377212cfb4fe548bc918cfa2896256917125e Mon Sep 17 00:00:00 2001
+From: tsteven4 <13596209+tsteven4@users.noreply.github.com>
+Date: Fri, 7 Aug 2020 06:58:05 -0600
+Subject: [PATCH] fix i386 regression error with engima.
+
+this was motivated by the test failure seen at
+https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=i386&ver=1.7.0%2Bds-4&stamp=1596794554&raw=0
+---
+ enigma.cc | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/enigma.cc b/enigma.cc
+index 850f27b4e..32fea92d6 100644
+--- a/enigma.cc
++++ b/enigma.cc
+@@ -21,9 +21,16 @@
+  */
++#include <cmath>           // for fabs, lround
++#include <cstdint>         // for int32_t, uint8_t, uint32_t
++#include <cstdlib>         // for abs
++#include <cstring>         // for strlen, memcpy, memset
++
++#include <QtCore/QString>  // for QString
++
+ #include "defs.h"
+-#include <cmath>
+-#include <cstdlib>
++#include "gbfile.h"        // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile
++
+ #define MYNAME "Enigma binary route and waypoint file format"
+@@ -177,7 +184,7 @@ enigma_waypt_disp(const Waypoint* wpt)
+   le_write32(&ewpt.longitude, decToEnigmaPosition(wpt->longitude));
+   ewpt.waypoint_type = WTYPE_WAYPOINT;
+   if (wpt->altitude != unknown_alt) {
+-    le_write32(&ewpt.data.wp_altitude, METERS_TO_FEET(wpt->altitude) + 1000);
++    le_write32(&ewpt.data.wp_altitude, lround(METERS_TO_FEET(wpt->altitude)) + 1000);
+   }
+   if (wpt->shortname != nullptr) {
+     ewpt.shortname_len = (uint8_t) min(6, strlen(CSTRc(wpt->shortname)));
index 3457dce87c39c0f8ace44f643631fc0b4c622ec5..2af2336c16fc0c59808ebe4dfab669a22c837556 100644 (file)
@@ -8,3 +8,4 @@ cross.patch
 gmapbase.html-location
 0009-Drop-mac-libusb-libusb.h-dependency.patch
 618.patch
+620.patch
index 64a8c87cba7960e165248ff04d53b1f375258f19..3db965a9fe741dd20941b08b91721ef25cd5681c 100755 (executable)
@@ -28,11 +28,3 @@ override_dh_auto_build-arch:
 override_dh_auto_build-indep:
        $(MAKE) doc
        $(MAKE) gpsbabel.html
-
-# Ignore broken unit tests on some architectures
-override_dh_auto_test:
-ifneq (,$(filter $(DEB_BUILD_ARCH),i386))
-       dh_auto_test || true
-else
-       dh_auto_test
-endif